<!DOCTYPE html>
<html>
<head>
<title>发送区块表</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <!-- 全局css -->
    <link href="../css/bootstrap.min.css?v=3.3.7" rel="stylesheet">
    <link rel="stylesheet" href="../fonts/font-awesome/font-awesome.css">
    <link rel="stylesheet" href="../fonts/web-icons/web-icons.css">
    <link rel="stylesheet" href="../js/plugins/elementui/index.css">
    <link rel="stylesheet" href="../js/plugins/toastr/toastr.css">
	<link rel="stylesheet" href="../css/skins/style.css" >
    <link rel="stylesheet" href="../css/common.css" >
    <link rel="stylesheet" href="../css/sys.css" >

    <!-- 全局js -->
    <script src="../js/plugins/jquery/jquery.min.js?v=2.1.4"></script>
    <script src="../js/plugins/layer/layer.min.js"></script>
    <script src="../js/plugins/bootstrap/bootstrap.min.js?v=3.3.6"></script>
    <script src="../js/plugins/vue/vue.min.js"></script>
    <script src="../js/plugins/elementui/index.js"></script>
    <script src="../js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="../js/plugins/toastr/toastr.min.js"></script>
    <script src="../js/plugins/tableExport/libs/FileSaver/FileSaver.min.js"></script>
    <script src="../js/plugins/tableExport/libs/js-xlsx/xlsx.core.min.js"></script>
    <script src="../js/plugins/tableExport/tableExport.min.js"></script>
    <script src="../js/common.js"></script>

</head>
<body class="gray-bg">

<div class="wrapper-content" id="rrapp" v-cloak>
    <div class="row cmm">
        <div class="col-sm-12">
        		<!--列表 begin-->
            <div class="ibox " v-show="showList">
                <div class="ibox-title">
                    <h5>发送区块表</h5>
                    <div class="ibox-tools" >
                        <button v-if="hasPermission('fsmssendcanvas:save')" class="btn btn-primary " @click="add">
                            <i class="fa fa-plus"></i>&nbsp;新增
                        </button>

                        <button class="btn btn-info "  v-if="false">
                            <i class="fa fa-filter"></i>
                        </button>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="row" >
                        <div class="search">
                            <div class="form-group col-sm-2">
                                <input type="text" class="form-control" v-model="q.searchName" @keyup.enter="query"  placeholder="名称">
                            </div>
                            <a class="btn btn-info" @click="query"><i class="fa fa-search"></i> 查询</a>
                        </div>
                        <div class="export">
                            <div class="ibox-tools" >
                                <el-dropdown size="medium" split-button type="default" @click="exportExl" @command="handleCommand">
                                    <i class="fa fa-download"></i> 导出数据
                                    <el-dropdown-menu slot="dropdown">
                                        <el-dropdown-item command="a">csv</el-dropdown-item>
                                        <el-dropdown-item command="b">txt</el-dropdown-item>
                                        <el-dropdown-item command="c">Excel</el-dropdown-item>
                                        <el-dropdown-item command="d">服务器下载</el-dropdown-item>
                                    </el-dropdown-menu>
                                </el-dropdown>
                            </div>
                        </div>
                        <div class="dataTable">
			                <table id="data" class="table table-bordered table-hover">
			                    <thead class="thead-default">
			                      <tr>
			                        <th class="text-center" style="width: 50px">#</th>
			                        <th class="text-center" v-for="ols in columnsList">{{ols.name}}</th>
			                        <th class="text-center" style="width: 150px">操作</th>
			                      </tr>
			                    </thead>
			                    <tbody>
			                      <tr v-for="(item,index) in dataList">
			                        <td class="text-center">{{index+1}}</td>
			                         <td class="text-center" v-if="columnsList[0].isShow">{{item.id}}</td>
			                         <td class="text-center" v-if="columnsList[0].isShow">{{item.sendId}}</td>
			                         <td class="text-center" v-if="columnsList[0].isShow">{{item.canvasId}}</td>
			                         <td class="text-center" v-if="columnsList[0].isShow">{{canvasTypeMap[item
			                         .canvasType]}}</td>
			                         <td class="text-center" v-if="columnsList[0].isShow">{{item.canvasSort}}</td>
			                         <td class="text-center" v-if="columnsList[0].isShow">{{item.content}}</td>
			                         <td class="text-center" v-if="columnsList[0].isShow">{{urlMap[item
			                         .url]}}</td>
			                         <td class="text-center" v-if="columnsList[0].isShow">{{item.createTime}}</td>
			                        <td class="text-center">
			                            <button class="btn btn-xs btn-primary btn-outline" @click="view(item.id)" v-if="false">
			                              <i class="fa fa-eye"></i>查看
			                            </button>
			                            <button class="btn btn-xs btn-info btn-outline" @click="update(item.id)">
			                              <i class="fa fa-edit"></i>修改
			                            </button>
			                            <button class="btn btn-xs btn-danger btn-outline" @click="delOne(item.id)">
			                              <i class="fa fa-trash-o"></i>删除
			                            </button>
			                        </td>
			                      </tr>
			                    </tbody>
			                </table>
                            <div class="text-center" v-show="dataList.length == 0">没有数据</div>
                            <div class="text-right" v-show="dataList.length > 0">
                                <el-pagination
                                        @size-change="pageSizeChange"
                                        @current-change="pageCurrentChange"
                                        :current-page="page.page"
                                        :page-sizes="[30, 50, 100, 200]"
                                        :page-size="30"
                                        layout="total, sizes, prev, pager, next, jumper"
                                        :total="page.total">
                                </el-pagination>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--列表 end-->
            
        		<!--输入 begin-->
            <div class="ibox " v-show="!showList">
                <div class="ibox-title">
                    <h5>{{title}}发送区块表</h5>
                    <div class="ibox-tools" >
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="panel-vue dataInput">
						<el-form  class="form-horizontal" :model="fsmsSendCanvas" ref="fsmsSendCanvasForm" :rules="rules">
				                      <el-row class="form-group">
				                        <el-col :xs="24" :span="6"  class="control-label">
				                          <span>id:</span>
				                        </el-col>
				                        <el-col :xs="24" :span="18">
				                          <el-form-item prop="id">
				                            <el-input v-show="!showView" v-model="fsmsSendCanvas.id"
				                            auto-complete="off"></el-input>
				                            <div class="el-view-content" v-show="showView"> {{fsmsSendCanvas.id}}</div>
				                          </el-form-item>
				
				                        </el-col>
				                      </el-row>
				
				                      <el-row class="form-group">
				                        <el-col :xs="24" :span="6"  class="control-label">
				                          <span>发送id:</span>
				                        </el-col>
				                        <el-col :xs="24" :span="18">
				                          <el-form-item prop="sendId">
				                            <el-input v-show="!showView" v-model="fsmsSendCanvas.sendId"
				                            auto-complete="off"></el-input>
				                            <div class="el-view-content" v-show="showView"> {{fsmsSendCanvas.sendId}}</div>
				                          </el-form-item>
				
				                        </el-col>
				                      </el-row>
				
				                      <el-row class="form-group">
				                        <el-col :xs="24" :span="6"  class="control-label">
				                          <span>区域ID:</span>
				                        </el-col>
				                        <el-col :xs="24" :span="18">
				                          <el-form-item prop="canvasId">
				                            <el-input v-show="!showView" v-model="fsmsSendCanvas.canvasId"
				                            auto-complete="off"></el-input>
				                            <div class="el-view-content" v-show="showView"> {{fsmsSendCanvas.canvasId}}</div>
				                          </el-form-item>
				
				                        </el-col>
				                      </el-row>
				
				                      <el-row class="form-group">
				                        <el-col :xs="24" :span="6"  class="control-label">
				                          <span>区域类别:</span>
				                        </el-col>
				                        <el-col :xs="24" :span="18">
				                          <el-form-item prop="canvasType">
				                            <el-select v-show="!showView" v-model="fsmsSendCanvas.canvasType" placeholder="请选择">
				                              <el-option
				                                v-for="item in canvasTypeList"
				                                :key="item.value"
				                                :label="item.text"
				                                :value="item.value">
				                              </el-option>
				                            </el-select>
				                            <div class="el-view-content" v-show="showView">{{canvasTypeMap[fsmsSendCanvas.canvasType]}}</div>
				                          </el-form-item>
				                        </el-col>
				                      </el-row>
				
				                      <el-row class="form-group">
				                        <el-col :xs="24" :span="6"  class="control-label">
				                          <span>排序:</span>
				                        </el-col>
				                        <el-col :xs="24" :span="18">
				                          <el-form-item prop="canvasSort">
				                            <el-input v-show="!showView" v-model="fsmsSendCanvas.canvasSort"
				                            auto-complete="off"></el-input>
				                            <div class="el-view-content" v-show="showView"> {{fsmsSendCanvas.canvasSort}}</div>
				                          </el-form-item>
				
				                        </el-col>
				                      </el-row>
				
				                      <el-row class="form-group">
				                        <el-col :xs="24" :span="6"  class="control-label">
				                          <span>内容:</span>
				                        </el-col>
				                        <el-col :xs="24" :span="18">
				                          <el-form-item prop="content">
				                            <el-input v-show="!showView" v-model="fsmsSendCanvas.content"
				                            auto-complete="off"></el-input>
				                            <div class="el-view-content" v-show="showView"> {{fsmsSendCanvas.content}}</div>
				                          </el-form-item>
				
				                        </el-col>
				                      </el-row>
				
				                      <el-row class="form-group">
				                        <el-col :xs="24" :span="6"  class="control-label">
				                          <span>内容标识:</span>
				                        </el-col>
				                        <el-col :xs="24" :span="18">
				                          <el-form-item prop="url">
				                            <el-select v-show="!showView" v-model="fsmsSendCanvas.url" placeholder="请选择">
				                              <el-option
				                                v-for="item in urlList"
				                                :key="item.value"
				                                :label="item.text"
				                                :value="item.value">
				                              </el-option>
				                            </el-select>
				                            <div class="el-view-content" v-show="showView">{{urlMap[fsmsSendCanvas.url]}}</div>
				                          </el-form-item>
				                        </el-col>
				                      </el-row>
				
				                      <el-row class="form-group">
				                        <el-col :xs="24" :span="6"  class="control-label">
				                          <span>创建时间:</span>
				                        </el-col>
				                        <el-col :xs="24" :span="18">
				                          <el-form-item prop="createTime">
				                            <el-input v-show="!showView" v-model="fsmsSendCanvas.createTime"
				                            auto-complete="off"></el-input>
				                            <div class="el-view-content" v-show="showView"> {{fsmsSendCanvas.createTime}}</div>
				                          </el-form-item>
				
				                        </el-col>
				                      </el-row>
				
						</el-form>
                        <div class="text-center">
                            <a v-show="!showView" v-if="hasPermission('fsmssendcanvas:save')" class="btn btn-primary"
                               @click="saveOrUpdate"><i class="fa fa-save"></i>&nbsp;保存</a>
                            <a v-show="showView" v-if="hasPermission('fsmssendcanvas:update')" class="btn btn-primary" @click="view2update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                            <a v-show="showView" v-if="hasPermission('fsmssendcanvas:delete')" class="btn btn-danger" @click="delOne"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
                            <a  class="btn btn-default" @click="reload"><i class="fa fa fa-mail-reply"></i>&nbsp;返回</a>
                        </div>
                    </div>
                </div>
            </div>
            <!--输入 end-->
            
        </div>
    </div>
</div>

<script src="../fsmsmgt/js/fsmsSendCanvas.js"></script>
</body>
</html>
